\section{Manual}

\subsection{System requirements}

\begin{itemize}
\item Java 1.5 JDK or higher
\item Unix for executing bash scripts (tested on Linux and Mac OS X)
\end{itemize}

\subsection{Installation}

The system consists of the Java source code, the FreePastry jar and a couple of scripts for building and running the system. To compile, execute the script \emph{compile.sh}.

\subsection{Starting peers}

To start the first peer in the network, execute the script \emph{boot.sh}. This will start a new ring binding.

To add additional peers to the network, execute the script \emph{peer.sh} for each peer. This will start a new peer connect it to the ring.

\subsection{Connecting peers}

To ask a peer $ A $ to join a game at another peer \emph{B}, use the command \texttt{join \emph{B}}. Peer \emph{B} will be the game initiater. An initiator can issue the command \texttt{status} to see who are currently connected. The initiator can start the game with the command \texttt{start}.

\subsection{Playing the game}

When a game has started, the players will be presented with the game status. The square numbers correspond to the squares on the board in appendix \ref{sec:ludo_board}
.

The current player in turn will also be prompted for a square number to move from (by typing the square number and hitting \textbf{enter}) or pass the round (by typing \texttt{-1} and hitting \textbf{enter}). The turn will alternate after each move.

Be aware that it may sometimes be necessary to press \textbf{enter} in order to update status. Also be aware that in case of a break-down, it will be necessary to restart every peer.

\subsection{A possible use case}

An idea for trying out the system is this:

\begin{enumerate}
\item Start up 5 peers (issuing \emph{boot.sh} in one terminal window and \emph{peer.sh} in four other windows).
\item Let one peer A join another peer with ID $ B $, and let B start the game.
\item Before playing, issue the command \texttt{status} on the three remaining peers. This will reveal whether any of the peers has become OP in the game. If they have, issue the command \texttt{log} on those peers.
\item Now, while playing, the OPs should display the messages that are exchanged between the players and the OPs.
\end{enumerate}
